//
//  ScrollerCollectionViewCell.m
//  WWAVPlayer
//
//  Created by dllo on 15/10/30.
//  Copyright © 2015年 LZY. All rights reserved.
//

#import "ScrollerCollectionViewCell.h"

@implementation ScrollerCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.myImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.myImageView];
        
        self.title = [[UILabel alloc] init];
        _title.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.4];
        _title.textColor = [UIColor whiteColor];
        _title.font = [UIFont systemFontOfSize:15];
        [self.myImageView addSubview:self.title];
    }
    return self;
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    
    self.myImageView.frame = self.contentView.bounds;
    self.title.frame = CGRectMake(0, self.contentView.bounds.size.height - 20, self.contentView.bounds.size.width, 20);
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
